<table class="content" align="center" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td class="content_title_top"><div><?php echo Kohana::lang('register_lang.lbl_title') ?></div></td>
  </tr>
  <tr>
    <td class="content_middle">
    <form name="frm" method="post" action="<?php echo $this->site['base_url']?>register/sm">
        <table align="center" cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><table align="center" cellspacing="0" cellpadding="0">
                <tr>
                  <td class="register_content"><table align="center" border="0" cellspacing="0" cellpadding="3">
                      <tr>
                        <td colspan="2" class="register_comment" align="center"><?php echo Kohana::lang('register_lang.lbl_comment') ?></td>
                      </tr>
                      <tr>
                        <td colspan="2" align="center"><font class="text_error"><?php if(isset($error_msg)) echo $error_msg ?></font></td>
                      </tr>
                      <tr>
                        <td width="40%" align="right"><?php echo Kohana::lang('customer_lang.lbl_username') ?> <font color="#FF0000">*</font></td>
                        <td><input id="txt_username" name="txt_username" style="width:200px;"  type="text" value="<?php if(isset($mr)) echo $mr['customers_username'] ?>" />
                          <div id="'username_feedback'"></div>
                        </td>
                      </tr>
                        <td width="40%" align="right"><?php echo Kohana::lang('customer_lang.lbl_password') ?> <font color="#FF0000">*</font></td>
                        <td><input id="txt_pass" name="txt_pass" type="password" style="width:200px;" value="<?php if(isset($mr)) echo $mr['customers_pass']?>" /></td>
                      </tr>
                      <tr>
                        <td width="40%" align="right"><?php echo Kohana::lang('customer_lang.lbl_confirm_pass') ?> <font color="#FF0000">*</font></td>
                        <td><input id="txt_configpass" name="txt_configpass" type="password" onblur="checkpassword()" style="width:200px;" value="<?php if(isset($mr)) echo $mr['customers_pass'] ?>" />
                        </td>
                      </tr>
                      <tr>
                        <td align="right"><?php echo Kohana::lang('customer_lang.lbl_email') ?> <font color="#FF0000">*</font></td>
                        <td><input id="txt_email" name="txt_email" style="width:200px;" type="text" value="<?php if(isset($mr)) echo $mr['customers_email'] ?>" /></td>
                      </tr>
                      <tr>
                        <td align="right">&nbsp;</td>
                        <td><font color="#FF0000">*</font> <?php echo Kohana::lang('site_lang.lbl_required_field') ?></td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td><input type="checkbox" name="chk_type" id="chk_type" value="1" <?php if(isset($mr) && $mr['customers_type']==1) echo 'checked="checked"'?>/>
                          <?php echo Kohana::lang('customer_lang.lbl_wholesaler') ?></td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td><a href="javascript:;" onclick="toggle_div('hideshow_register')"><?php echo Kohana::lang('register_lang.lbl_more_information') ?></a></td>
                      </tr>
                      <tr>
                        <td align="left" colspan="2"><div style="display:none" id="hideshow_register">
                            <table align="center" cellpadding="3" cellspacing="0">
                              <!--<tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_fullname') ?></td>
                                <td><input type="text" name="txt_fullname" id="txt_fullname" size="30" value="<?php if(isset($mr)) echo $mr['customers_name']?>"/></td>
                              </tr>-->
                              <tr>
                                <td width="40%" align="right"><?php echo Kohana::lang('customer_lang.lbl_first_name') ?></td>
                                <td><input type="text" name="txt_firstname" id="txt_firstname" size="30" value="<?php if(isset($mr)) echo $mr['customers_firstname']?>"/></td>
                              </tr>
                              <tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_last_name') ?></td>
                                <td><input type="text" name="txt_lastname" id="txt_lastname" size="30" value="<?php if(isset($mr)) echo $mr['customers_lastname']?>"/></td>
                              </tr>                              
                              <tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_street') ?></td>
                                <td><input type="text" id="txt_address" name="txt_address" size="30" value="<?php if(isset($mr)) echo $mr['customers_address']?>"/></td>
                              </tr>
                              <tr>
                                <td align="right"></td>
                                <td><input type="text" name="txt_address2" id="txt_address2" size="30" value="<?php if(isset($mr)) echo $mr['customers_address2']?>"/></td>
                              </tr>                              
                              <tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_city') ?>/<?php echo Kohana::lang('customer_lang.lbl_state') ?>/<?php echo Kohana::lang('customer_lang.lbl_zipcode') ?></td>
                                <td><input type="text" name="txt_city" id="txt_city" size="30" value="<?php if(isset($mr)) echo $mr['customers_city']?>"/></td>
                              </tr>
                              <tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_state') ?></td>
                                <td>
                                <select name="sel_state" id="sel_state" style="width:212px">
                                    <option value="">---</option>
                                    <?php for($i=0; $i<count($list_state); $i++) { ?>
                                    <option value="<?php echo $list_state[$i]['state_code']?>"><?php echo $list_state[$i]['state_name']?></option>
                                    <? } ?>
                                </select>
                                </td>
                              </tr>
                              <tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_zipcode') ?></td>
                                <td><input type="text" name="txt_zipcode" id="txt_zipcode" size="30" value="<?php if(isset($mr)) echo $mr['customers_zipcode']?>"/></td>
                              </tr>
                              <tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_phone') ?></td>
                                <td><input type="text" name="txt_phone" id="txt_phone" size="30" value="<?php if(isset($mr)) echo $mr['customers_phone'] ?>"/></td>
                              </tr>
                              <tr>
                                <td align="right"><?php echo Kohana::lang('customer_lang.lbl_fax') ?></td>
                                <td><input type="text" name="txt_fax" id="txt_fax" size="30" value="<?php if(isset($mr)) echo $mr['customers_fax'] ?>"/></td>
                              </tr>
                            </table>
                          </div></td>
                      </tr>
                      <tr>
                        <td align="right">&nbsp;</td>
                        <td><input type="submit" id="btn_submit" name="btn_submit" class="button"  value="<?php echo Kohana::lang('register_lang.btn_register') ?>">
                          &nbsp;
                          <input type="reset"  class="button" value="<?php echo Kohana::lang('register_lang.btn_reset') ?>"></td>
                      </tr>
                    </table></td>
                </tr>
                <!--<tr>
          <td class="register_bottom"></td>
        </tr>-->
              </table></td>
          </tr>
        </table>
      </form>
      </td>
  </tr>
  <tr>
    <td class="content_bottom"></td>
  </tr>
</table>
<script type="text/javascript"> 
	function checkpassword()
	{
		if(document.getElementById('txt_configpass').value !="")
			{
				if(document.getElementById('txt_pass').value != document.getElementById('txt_configpass').value)
				{
					alert("Confirm password do not match!");
					document.getElementById('txt_configpass').value = "";
					document.getElementById('txt_configpass').focus();
				}
			}
	
	}
</script>
